package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FaEsmPlineMapper;
import com.ruoyi.system.domain.FaEsmPline;
import com.ruoyi.system.service.IFaEsmPlineService;

/**
 * 产线Service业务层处理
 * 
 * @author colin
 * @date 2021-08-11
 */
@Service
public class FaEsmPlineServiceImpl implements IFaEsmPlineService 
{
    @Autowired
    private FaEsmPlineMapper faEsmPlineMapper;

    /**
     * 查询产线
     * 
     * @param id 产线主键
     * @return 产线
     */
    @Override
    public FaEsmPline selectFaEsmPlineById(String id)
    {
        return faEsmPlineMapper.selectFaEsmPlineById(id);
    }

    /**
     * 查询产线列表
     * 
     * @param faEsmPline 产线
     * @return 产线
     */
    @Override
    public List<FaEsmPline> selectFaEsmPlineList(FaEsmPline faEsmPline)
    {
        return faEsmPlineMapper.selectFaEsmPlineList(faEsmPline);
    }

    /**
     * 新增产线
     * 
     * @param faEsmPline 产线
     * @return 结果
     */
    @Override
    public int insertFaEsmPline(FaEsmPline faEsmPline)
    {
        faEsmPline.setCreateTime(DateUtils.getNowDate());
        return faEsmPlineMapper.insertFaEsmPline(faEsmPline);
    }

    /**
     * 修改产线
     * 
     * @param faEsmPline 产线
     * @return 结果
     */
    @Override
    public int updateFaEsmPline(FaEsmPline faEsmPline)
    {
        faEsmPline.setUpdateTime(DateUtils.getNowDate());
        return faEsmPlineMapper.updateFaEsmPline(faEsmPline);
    }

    /**
     * 批量删除产线
     * 
     * @param ids 需要删除的产线主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmPlineByIds(String[] ids)
    {
        return faEsmPlineMapper.deleteFaEsmPlineByIds(ids);
    }

    /**
     * 删除产线信息
     * 
     * @param id 产线主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmPlineById(String id)
    {
        return faEsmPlineMapper.deleteFaEsmPlineById(id);
    }
}
